<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../../../assets/libs/jquery/jquery-3.6.1.min.js"></script>
  <script src="../../../assets/libs/jquery/jquery.color.min.js"></script>
  <style>
    div {
      width: 0;
      height: 20px;
    }
  </style>
</head>

<body>
  <button>animate</button>
  <div></div>

  <script>
    $('button').click(() => {
      $('div').stop().animate({
        width: '200px',
        'background-color': '#17f'
      }, 1000)
    })
  </script>
</body>

</html>